# plot feature importance using built-in function

data_list = ["../../data/originData/crc2_mv34_otu_qiime_silva99v2_m3_std.txt",
                 "../../data/originData/crc4_mv34_otu_qiime_silva99v2_m3_std.txt",
                 "../../data/originData/crc45_mv34_otu_qiime_silva99v2_m3_std.txt",
                 "../../data/originData/liyan32_nv4_otu_qiime_silva99v2_m3_std.txt",
                 "../../data/originData/liyan38_mv34_otu_qiime_silva99v2_m3_std.txt",
                 "../../data/originData/p8_mv34_otu_qiime_silva99v2_m3_std.txt",
                 "../../data/originData/p12_mv34_otu_qiime_silva99v2_m3_std.txt",
                 "../../data/originData/sd162_nv4_otu_qiime_silva99v2_m3_std.txt",
                 "../../data/originData/sd225_mv34_otu_qiime_silva99v2_m3_std.txt",
                 "../../data/originData/yansu164_nv4_otu_qiime_silva99v2_m3_std.txt",
                 "../../data/originData/yansu177-1.txt",
                 ]
indefinitelengthconversion_getKey(data_list)
def std_map_txt_to_save(std_file_list, map_file_list):
    """读取std，map文件并且保存为pkl"""
    for mi in range(len(map_file_list)):
        map_file = map_file_list[mi]
        mapData = pd.read_csv(map_file, sep="\t", header=0)
        sample_id_map_list_mi = mapData.loc[:, ["#SampleID", "Type"]].values  # 样本编号和分类的映射
        if mi != 0:
            sample_id_map_list = np.concatenate((sample_id_map_list_mi, sample_id_map_list), axis=0)
        else:
            sample_id_map_list = sample_id_map_list_mi

    for i in range(len(std_file_list)):
        X, Y = load_std_map_data(std_file_list[i], sample_id_map_list)
        if i != 0:
            result_x = np.concatenate((X, result_x), axis=0)
            result_y = np.concatenate((Y, result_y), axis=0)
        else:
            result_x = X
            result_y = Y
